
all: fcalc ast_fcalc

clean:
	find . -regex ".*\(\.\(o\|exe\)\|~\)" -exec rm {} ';'
	rm -f ast_fcalc fcalc debug.log
	rm -f ./input/*.out debug.log

BOOST_INCLUDE = /usr/include/boost-1_33_1/
FMER_PATH = ../lr_solver

#CCFLAGS = -I. -I $(BOOST_INCLUDE) -I $(FMER_PATH) -Wall -DUNIX
CCFLAGS = -I. -I $(BOOST_INCLUDE) -I $(FMER_PATH) -Wall -ggdb -DUNIX -DDEBUG
#-DUSE_RATIONAL
LDFLAGS = -L. -L /usr/local/lib/ -L $(FMER_PATH) -lrfm

OBJS = fcalc.o 
AST_OBJS  = ast_fcalc.o 

run: fcalc
	./fcalc

fcalc: $(OBJS)
	g++ -o $@ $^ $(LDFLAGS)

ast_fcalc: $(AST_OBJS)
	g++ -o $@ $^ $(LDFLAGS)

.cpp.o:
	g++ -c -o $@ $(CCFLAGS) $<

